home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
internet
/
irc_i_dodatki
/
mcf4amirc
/
rexx
/
dalhelper.amirx
< prev
next >
Wrap
Text File
|
1996-10-07
|
6KB
|
14 lines
/* DalHelper.AMIRX
// $VER: DalHelper.AMIRX 4.7 (11.10.96)
\\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
// Please mail any bug reports/comments to the above address with a subject
\\ header of MCF.AMIRX.
//
\\ ** What to do with this file?
// Put this script in REXX:
\\ Make the following Aliases:
//
\\ /Alias CS /Rx DalHelper C %p
// /Alias NS /Rx DalHelper N %p
*/
;parse arg j1 j2 j3 j4 j5 j6;j1=upper(j1);x1=left(upper(j2),3);x2=left(upper(j2),2);if j1 ~='N'&j1 ~='C' then exit;if j1='C' then DalDest="CHANSERV";if j1='N' then DalDest="NICKSERV";if x2="IN" then signal NoNeed;fname="MCF:MCF.Dal";ccnt=0;ncnt=0;if ~exists(fname) then address command "Echo >MCF:MCF.Dal $VER: MCF.Dal 4.7 (11.10.96)";if exists(fname) then;do;call open("Input",fname,'R');xx=readln("Input");do mcnt=1 by 1 until eof("Input");Dal.mcnt=xx;select;when 1=pos('$',xx) then continue;when 0=pos('#',xx) then;do;ncnt=ncnt+1;parse value xx with Nick.ncnt NPass junk;interpret Nick.ncnt "= NPass";end;when 1=pos('#',xx) then;do;ccnt=ccnt+1;parse value xx with Chan.ccnt CPass junk;interpret Chan.ccnt "= CPass";end;otherwise continue;end;xx=readln("Input");end mcnt;call close("Input");end;options results;getchannel;CurChan=result;getmynick;MyNick=result;j6=strip(j6,'B');select;when j6 ~="" then xhelp=j3 j4 j5 strip(j6);when j5 ~="" then xhelp=j3 j4 j5;when j4 ~="" then xhelp=j3 j4;when j3 ~="" then xhelp=j3;otherwise xhelp="";end;if j1='N' then;do;if j3 ~="" then Name=j3;if j3="" then;do;if 0 ~=pos(x2,'ID DR AL GH') then Name=MyNick;if 0=pos(x2,'ID DR AL GH') then Name=Nick.1;if 0 ~=pos(x1,'REC REL') then Name=MyNick;j3=Name;end;if 0=pos('@',Name) then;do;Pass=value(Name);CPas=Pass;end;end;if j1='C' then;do;if j3 ~="" then Chan=j3;if j3="" then;do;if 0 ~=pos(x2,'ID DR') then Chan=CurChan;if 0=pos(x2,'ID DR') then Chan=Chan.1;if 0 ~=pos(x1,'AOL SOL') then Chan=CurChan;j3=Chan;end;pl=pos('@',Chan)+pos('*',Chan);if pl=0 then;do;Pass=value(Chan);CPas=Chan Pass;end;end;if x1='REG'|x2='PA' then;do;RParm=j3;if j4 ~="" then RParm=RParm j4;if j5 ~="" then RParm=RParm j5;if j6 ~="" then RParm=RParm j6;if j1='C'&0=pos('#',RParm) then;do;call GetChan();RParm=Chan RParm;if j4="" then;do;if x1='REG' then RParm=RParm "My Channel";end;parse value RParm with j3 j4 junk;end;end;NoNeed:;select;when x2='DR' then "RAW PRIVMSG "DalDest" :Drop" j3;when x2='HE' then "RAW PRIVMSG "DalDest" :Help" xhelp;when x2='ID' then "RAW PRIVMSG "DalDest" :Identify" CPas;when x2='IN' then "RAW PRIVMSG "DalDest" :Info" j3;when x2='PA' then "RAW PRIVMSG "DalDest" :Passwd" RParm;when x1='REG' then "RAW PRIVMSG "DalDest" :Register" RParm;when j1='N' then select;when x2='AA' then "RAW PRIVMSG "DalDest" :Access Add" j3;when x2='AD' then "RAW PRIVMSG "DalDest" :Access Del" j3;when x2='AL' then "RAW PRIVMSG "DalDest" :Access List" j3;when x2='GH' then "RAW PRIVMSG "DalDest" :Ghost" Name Pass;when x1='REC' then "RAW PRIVMSG "DalDest" :Recover" Name Pass;when x1='REL' then "RAW PRIVMSG "DalDest" :Release" Name Pass;otherwise "echo P="d2c(27)"««MCF» "d2c(2)"NickServ"d2c(2)" commands are: AList, AAdd, ADel DRop, GHost, HElp, IDentify, INfo, PAsswd, RECover, REGister, RELease..";end;when j1='C' then select;when x2='MD' then "RAW PRIVMSG "DalDest" :MDeop" Chan;when x2='MK' then "RAW PRIVMSG "DalDest" :MKick" Chan;when x2='UN' then "RAW PRIVMSG "DalDest" :UnBan" Chan "Me";when x1='AOA' then;do;call GetChan();"RAW PRIVMSG "DalDest" :AOP" Chan "Add" Name;end;when x1='AOD' then;do;call GetChan();"RAW PRIVMSG "DalDest" :AOP" Chan "Del" Name;end;when x1='AOL' then;do;call GetChan();"RAW PRIVMSG "DalDest" :AOP" Chan "List";end;when x1='SOA' then;do;call GetChan();"RAW PRIVMSG "DalDest" :SOP" Chan "Add" Name;end;when x1='SOD' then;do;call GetChan();"RAW PRIVMSG "DalDest" :SOP" Chan "Del" Name;end;when x1='SOL' then;do;call GetChan();"RAW PRIVMSG "DalDest" :SOP" Chan "List";end;otherwise "echo P="d2c(27)"««MCF» "d2c(2)"ChanServ"d2c(2)" commands are: AOAdd, AODel, AOList, DRop, HElp, IDentify, INfo, MDeop, MKick, PAsswd, REGister, SOAdd, SODel, SOList, UNban.";end;end;select;when x2='MK' then;llit=":MASSKICK COMPLETE";when x2='UN' then;llit=upper(Chan)||" ARE NOW CLEARED";when x1='REG' then;llit=" ";when x2='DR' then;llit=" ";when x2='PA' then;llit=" ";otherwise exit;end;qflag='N';do until qflag ~='N';getline;lrest=upper(line.rest);if lrest=':%DAL' then exit;pfix=left(upper(line.prefix),8);if pfix ~= DalDest then iterate;if line.command ~='NOTICE' then iterate;if upper(line.dest) ~=upper(MyNick) then iterate;if 0 ~=pos(llit,lrest) then qflag='J';end;select;when x1='REG' then;do;if 0=pos("REGISTERED",lrest) then exit;if j1='N' then;do;j4=j3;j3=MyNick;end;call open("Output",fname,'A');wlen=writeln("Output",j3 j4);call close("Output");end;when x2='DR' then;do;if 0=pos("OPPED",lrest) then exit;address command "Echo >MCF:MCF.Dal $VER: MCF.Dal 4.7 (11.10.96)";scnt=1;if 0 ~=pos('$VER', Dal.1) then scnt=2;call open("Output",fname,'A');do ocnt=scnt by 1 while ocnt ~>mcnt;if 1=pos(upper(j3),upper(Dal.ocnt)) then iterate ocnt;wlen=writeln("Output", Dal.ocnt);end ocnt;call close("Output");end;when x2='PA' then;do;if 0=pos("CHANGED",lrest) then exit;if j1='N' then;do;j4=j3;j3=MyNick;end;address command "Echo >MCF:MCF.Dal $VER: MCF.Dal 4.7 (11.10.96)";scnt=1;if 0 ~=pos('$VER', Dal.1) then scnt=2;call open("Output",fname,'A');do ocnt=scnt by 1 until ocnt=mcnt;if 1=pos(upper(j3),upper(Dal.ocnt)) then Dal.ocnt=j3 j4;wlen=writeln("Output", Dal.ocnt);end ocnt;call close("Output");end;when qflag='J' then;do;address command wait 9 sec;"Say /JOIN" Chan;end;otherwise exit;end;exit;GetChan:;if 0 ~=pos('#',Chan) then Name=j4;if 0=pos('#',Chan) then;do;Chan=CurChan;Name=j3;end;return